﻿@model DragAndDrop
@{
    Layout = null;

    // get config object
    var configObject = Model.GetConfigObject<DragAndDropConfigObject>();

    // get items
    var items = Model.AddedDragAndDropItems == null ? new List<AddedDragAndDropItem>() : Model.AddedDragAndDropItems.ToList();
}
<!DOCTYPE html>
<html>
<head>
    <title>Index</title>
    <link href='http://fonts.googleapis.com/css?family=Short+Stack|Press+Start+2P' rel='stylesheet'
        type='text/css' />
    <link rel="Stylesheet" href="@Url.Content("~/Areas/ProggyCore/Content/Css/DragAndDrop.css")"/>
    @foreach (var stylesheet in configObject.Stylesheets)
    {
        <link rel="Stylesheet" href="@Url.Content(stylesheet)" />
    }
</head>
<body>
    <div 
        id="@(configObject.AreaId)"
        class="@(configObject.AreaClass)">
        @{
            // start visual counter
            var i = 1;

            // iterate items
            foreach (var item in items)
            {
                Html.RenderPartial("~/Areas/ProggyCore/Views/DragAndDrop/DragAndDropEditorView.cshtml", new AddedDragAndDropItemRenderViewModel { Item = item, RenderAsEditor = true, Number = i++ });
            }
        }
    </div>
</body>
</html>
